let layer = layui.layer;
var laypage = layui.laypage;


list();
function list(){
  let str="";
  $.ajax({
    url:"/my/article/cates",
    type:"get",
    success:function(res){
        if(res.status==0){
          
          res.data.forEach(item => {
              str+=`
              <tr>
              <td>${item.name}</td>
              <td>${item.alias}</td>
              <td>
              <button type="button" class="layui-btn layui-btn-xs btnEdit" data-name="${item.name}" data-alias="${item.alias}" data-id="${item.Id}">编辑</button>
              <button type="button" class="layui-btn layui-btn-xs layui-btn-danger btnDelete" data-id="${item.Id}">删除</button>
            </td></tr>`
          });
         $('tbody').html(str);
        }
    }
  })
}
